-- GENERATED SPELL FOR [Silvermoon Ranger] --


function spell0_18147(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18147', 609, 1)
end

function spell1_18147(pUnit, Event) --@Shoot Bow,n/a--
pUnit:FullCastSpellOnTarget(29120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18147', 595, 1)
end

function Sorts_18147(pUnit, Event)
local choix_sorts_18147 = math.random(0, 1)
if choix_sorts_18147 == 0 then
pUnit:RegisterEvent('spell0_18147', 1, 1)
end
if choix_sorts_18147 == 1 then
pUnit:RegisterEvent('spell1_18147', 1, 1)
end
end

function mob18147_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18147', math.random(1500, 3000), 1)
end

function mob18147_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18147_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18147_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18147, 1, 'mob18147_Action')
RegisterUnitEvent(18147, 2, 'mob18147_Leave')
RegisterUnitEvent(18147, 3, 'mob18147_Kill')
RegisterUnitEvent(18147, 4, 'mob18147_Die')
